home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 62
/
Volume 62 - JOGO DISK .iso
/
Games
/
penguin_dinner.swf
/
scripts
/
__Packages
/
classes
/
ui
/
GameCompletedScreen.as
< prev
next >
Wrap
Text File
|
2008-03-17
|
1KB
|
42 lines
class classes.ui.GameCompletedScreen extends classes.ui.AbstractWidget
{
function GameCompletedScreen()
{
super();
classes.core.SoundManager.getInstance().startMusicTrack("crowd_clap",1);
this.doLater(this.init);
}
function init()
{
this.main_menu_btn.addEventListener(classes.ui.TextButton.CLICK,this,"onButtonClick");
this.submit_score_btn.addEventListener(classes.ui.TextButton.CLICK,this,"onButtonClick");
this.scores_btn.addEventListener(classes.ui.TextButton.CLICK,this,"onButtonClick");
this.more_games_btn.addEventListener(classes.ui.TextButton.CLICK,this,"onButtonClick");
}
function onButtonClick(e)
{
switch(e.target)
{
case this.main_menu_btn:
classes.core.Application.getInstance().gotoToMainMenu();
break;
case this.submit_score_btn:
classes.utils.URLCaller.submitScore(classes.core.SOManager.getInstance().__get__totalScore());
break;
case this.scores_btn:
classes.utils.URLCaller.viewScores();
break;
case this.more_games_btn:
classes.utils.URLCaller.mainLink();
}
}
function dispose()
{
this.main_menu_btn.dispose();
this.submit_score_btn.dispose();
this.scores_btn.dispose();
this.more_games_btn.dispose();
super.dispose();
}
}